<?php
	switch($_GET["figura"]){
		case "rectangulo":
			
			$base = $_POST["base"];
			$altura = $_POST["altura"];
			$area = $base * $altura;
			
			echo "Area ".$_GET["figura"]." = ".$area;
			
			
		break;
		
		case "triangulo":
		
			$base = $_POST["base"];
			$altura = $_POST["altura"];
			$area = ($base * $altura)/2;
			
			echo "Area ".$_GET["figura"]." = ".$area;
			
		break;
		
		case "circulo":
			$radio = $_POST["radio"];
			
			$area = pow($radio,2)*M_PI;
			
			echo "Area ".$_GET["figura"]." = ".$area;
		break;
		
	}
	
?>